package com.ruoyi.domain.entity;


import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

public class ForumPostDto{

    private String stockName;

    private String username;

    /** 主键ID */
    private Integer id;

    /** 用户ID */
    private Integer userId;

    /** 帖子标题 */
    private String title;

    /** 内容 */
    private String content;

    /** 图片地址，多张图片以“||”分割 */
    private String imageUrl;

    /** 点赞数 */
    private Integer praise;

    /** 股票ID（可选，用于关联特定股票） */
    private Integer stockId;

    /** 评论数*/
    private Integer commentCount;

    /** 用户头像地址*/
    private String avatar;

    /** 创建时间*/
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    public void setId(Integer id)
    {
        this.id = id;
    }

    public Integer getId()
    {
        return id;
    }
    public void setUserId(Integer userId)
    {
        this.userId = userId;
    }

    public Integer getUserId()
    {
        return userId;
    }
    public void setTitle(String title)
    {
        this.title = title;
    }

    public String getTitle()
    {
        return title;
    }
    public void setContent(String content)
    {
        this.content = content;
    }

    public String getContent()
    {
        return content;
    }
    public void setImageUrl(String imageUrl)
    {
        this.imageUrl = imageUrl;
    }

    public String getImageUrl()
    {
        return imageUrl;
    }
    public void setPraise(Integer praise)
    {
        this.praise = praise;
    }

    public Integer getPraise()
    {
        return praise;
    }
    public void setStockId(Integer stockId)
    {
        this.stockId = stockId;
    }

    public Integer getStockId()
    {
        return stockId;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getStockName() {
        return stockName;
    }

    public void setStockName(String stockName) {
        this.stockName = stockName;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public Integer getCommentCount() {
        return commentCount;
    }

    public void setCommentCount(Integer commentCount) {
        this.commentCount = commentCount;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("userId", getUserId())
                .append("title", getTitle())
                .append("content", getContent())
                .append("createTime", getCreateTime())
                .append("imageUrl", getImageUrl())
                .append("praise", getPraise())
                .append("stockId", getStockId())
                .append("stockName", getStockName())
                .append("username", getUsername())
                .append("commentCount", getCommentCount())
                .append("avatar", getAvatar())
                .toString();
    }
}